<template>
  <div>
     <mc-key-value-list :data="data" key-name="k" value-name="v" key-placeholder="键" value-placeholder="文本" :key-is-int="true"></mc-key-value-list>

     <el-button @click="print">打印</el-button>
     <el-button @click="change">变更</el-button>
  </div>
</template>

<script>
import McKeyValueList from './components/McKeyValueList'

export default {
    data(){
      return {
          data:[],
		  }
    },
    components:{
     McKeyValueList
    },
    methods:{
        print(){
            console.log(this.data)
        },
        saveData(val){
            console.log(val);
        },
        change(){
            this.data.fields = [{"name":"id","title":"主键"}]
        },
        choose:function(data){
            this.currentData.item[this.currentData.field]=data.field;
        }
    }
}
</script>

<style>

</style>
